Skip to content

Lean on hatch-vcs for managing the package version#28

Merged
Maxteabag merged 1 commit into
Maxteabag:mainfrom
kgaughan:hatch-vcs
Dec 22, 2025
Merged

Lean on hatch-vcs for managing the package version#28
Maxteabag merged 1 commit into
Maxteabag:mainfrom
kgaughan:hatch-vcs

Conversation

@kgaughan

@kgaughan kgaughan commented Dec 21, 2025

Copy link
Copy Markdown
Contributor

Not sure how interested you are in this, but I figure I'd might as well check.

This simplifies the mechanics of the release build a tad and means pyproject.toml doesn't need to be updated. It also means that __version__ is now a lot cheaper to determine as _version.py will be automatically generated with the correct information at build time.

Here's an example of triggering the build with uv build after creating the tag v1.2.0:

$ uv build
Building source distribution...
Building wheel from source distribution...
Successfully built dist/sqlit_tui-1.2.0.tar.gz
Successfully built dist/sqlit_tui-1.2.0-py3-none-any.whl

And the same with build:

$ uv run python -m build
      Built sqlit-tui @ file:///home/keith/projects/sqlit
Uninstalled 1 package in 0.56ms
Installed 1 package in 1ms
* Creating isolated environment: virtualenv+pip...
* Installing packages in isolated environment:
  - hatch-vcs
  - hatchling
* Getting build dependencies for sdist...
* Building sdist...
* Building wheel from sdist
* Creating isolated environment: virtualenv+pip...
* Installing packages in isolated environment:
  - hatch-vcs
  - hatchling
* Getting build dependencies for wheel...
* Building wheel...
Successfully built sqlit_tui-1.2.0.tar.gz and sqlit_tui-1.2.0-py3-none-any.whl

There should be no behavioural changes from how things currently work.

@kgaughan kgaughan marked this pull request as ready for review December 21, 2025 18:37
@Maxteabag

Copy link
Copy Markdown
Owner

Thanks for the PR!

@Maxteabag Maxteabag merged commit 865ac0a into Maxteabag:main Dec 22, 2025
20 checks passed
@kgaughan kgaughan deleted the hatch-vcs branch December 22, 2025 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants